<include file="Public/head" />
<script type="text/javascript" src="/static/js/premage.js"></script>
<style type="text/css">
    .eq_input{border: 1px solid #ececec;  height: 30px;  line-height: 30px;  width: 360px;}
    .equipment_sub{}
    .equipment_sub input{ background: #20ab4f none repeat scroll 0 0; border: 1px solid #20ab4f;border-radius: 3px;color: #fff;cursor: pointer;
                         font-size: 14px;height: 30px;line-height: 30px;margin: 30px 10px;text-align: center;width: 170px;}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar"  menu="nrgl.equipment" />

    <div class="mianR">
        <div class="add_page">
            <h3 class="cha">修改回传设备</h3>
            <div class='equipment'>
                <!--            <form id="add_carousel" action='/Carousel/add_carousel_post' enctype='multipart/form-data' method='post'>-->
                <table width="100%">
                    <tr style="height:82px;">
                        <td>设备号</td>
                        <td>
                            <input type="text" id="imei" name="imei" value="{$equipment.imei}" placeholder="请输入设备号" class="eq_input">
                        </td>
                    </tr>

                </table>
                <div class='equipment_sub'>
                    <input type="hidden" value="{$equipment.id}" name="eid" id="eid">
                    <input type="button" value="确定" name="submit_equipment">
                    <input type="button" value="取消" name="cancel_equipment" onclick="history.back()">
                </div>
            </div>
            <div class="yunBei" style="z-index:999998"></div>
        </div>
    </div>
    <div class="clear"></div>
</div>

<script type="text/javascript">
    /**
     * 
     * @param {type} param1
     * @param {type} param2添加
     */
    $("input[name='submit_equipment']").on('click',function(){
         var id=$("#eid").val();
         var imei = $("#imei").val();
         $.post("/Equipment/edit_equipment_post", {"id":id,"imei":imei}, function (res) {
            if (res.code == 200) {
                btn_alert(res.msg);
                setTimeout(function () {
                    window.location.href = "/Equipment/index";
                }, 2000);
            } else {
                shibai_alert(res.msg);
            }
        }, 'json');
    });
    /**
     * 返回
     */
    
    

</script>

<include file="Public/foot" />
